package com.cug.campus_sh_market_server.controller;


import com.cug.campus_sh_market_server.entity.param.OrderParam;
import com.cug.campus_sh_market_server.entity.param.college.CollegeAddParam;
import com.cug.campus_sh_market_server.entity.param.college.CollegePutParam;
import com.cug.campus_sh_market_server.entity.param.college.CollegeQueryParam;
import com.cug.campus_sh_market_server.entity.po.College;
import com.cug.campus_sh_market_server.entity.vo.ResultData;
import com.cug.campus_sh_market_server.entity.vo.college.CollegeVO;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.security.PermitAll;
import java.util.List;

import static com.cug.campus_sh_market_server.common.constant.UrlConstants.COLLEGE_PREFIX;

/**
 * <p>
 * 学院 前端控制器
 * </p>
 *
 * @author sxt
 * @since 2022-03-22
 */
@RestController
@RequestMapping(COLLEGE_PREFIX)
public class CollegeController
        extends AbsPreAuthorizeRestfullController<College, CollegeQueryParam, CollegeAddParam, CollegePutParam, CollegeVO> {

    @PreAuthorize("permitAll()")
    @Override
    protected ResultData<List<CollegeVO>> getData(CollegeQueryParam collegeQueryParam, OrderParam orderParam) {
        return super.getData(collegeQueryParam, orderParam);
    }
}

